#include "BaseTerrainPlugin.h"
#include "Log.h"
#include "Expand/PluginsManager.h"
#include "Managers/GameManager.h"

#include "Subsystems/SubsystemTerrain.h"
#include "SubsystemBaseTerrain.h"
#include "GameSingleton.h"

#include "Log.h"


namespace PocketSurvival
{
    BaseTerrainPlugin::BaseTerrainPlugin()
    {
        GameSingleton::gameManager->replaceSubsystem<SubsystemTerrain, SubsystemBaseTerrain>();
    }

    const std::string &BaseTerrainPlugin::getPluginName()
    {
        static const std::string pluginName = "原版地形插件";
        return pluginName;
    }

    const std::string &BaseTerrainPlugin::getIntroduce()
    {
        static const std::string introduce = "这只是一个原版的地形插件";
        return introduce;
    }

    uint32_t BaseTerrainPlugin::getUseAuthLevel()
    {
        return 100;
    }

    AuthDisplayType BaseTerrainPlugin::getDisplayType()
    {
        return AuthDisplayType::Authority;
    }

    void BaseTerrainPlugin::processCmd(ChatObj &chatObj, std::vector<std::string> &cmdDataVec) {}

} // namespace PocketSurvival


using namespace PocketSurvival;

extern "C" void initialize()
{
    GameSingleton::singletonPtr->getSingleton<PluginsManager>()->registerPlugin<BaseTerrainPlugin>();
    Log::Info("成功加载 BaseTerrainPlugin 插件");
}